function IsDate(str)
{ 	
	var arrData = str.split("/");	
	var iday = parseInt(arrData[0], 10);
	var imonth = parseInt(arrData[1], 10);
	var iyear = parseInt(arrData[2], 10);	
	if (isNaN(arrData[0]) || isNaN(arrData[1]) || isNaN(arrData[2]))
	{
		return false;
	}
	else
	{
		switch(imonth)
		{
			case 1:
			case 3:
			case 5:
			case 7:
			case 8:
			case 10:
			case 12:
			  {
				if (iday < 1 || iday > 31)
				{
					return false;
				}				
			  }
			break;
			case 4:
			case 6:
			case 9:
			case 11:
			  {
				if (iday < 1 || iday > 30)
				{
					return false;
				}				
			  }
			  break;
			case 2:
			  {
				if (iyear % 4 == 0 && iyear % 100 != 0 || iyear % 400 == 0)
				{
					if (iday < 1 || iday > 29)
					{
						return false;
					}
				}
				else
				{
					if (iday < 1 || iday > 28)
					{
						return false;
					}
				}				
			  }
			  break;
			default:
			  return false;
			  break;
		}
	}
	
	return true;
}

function IsDirectory(str)
{
	var regexp = /^\/[a-zA-Z0-9_\.]+/;
	if (!regexp.exec(str)) return false;
	return true;
}